package com.eam.common.service.impl;

import com.eam.common.domain.EamAsset;
import com.eam.common.mapper.EamAssetMapper;
import com.eam.common.service.IEamAssetService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 资产Service业务层处理
 * 
 * @author eam
 * @date 2022-03-14
 */
@Service
public class EamAssetServiceImpl implements IEamAssetService 
{
    @Autowired
    private EamAssetMapper eamAssetMapper;

    /**
     * 查询资产
     * 
     * @param assetId 资产主键
     * @return 资产
     */
    @Override
    public EamAsset selectEamAssetByAssetId(Long assetId)
    {
        return eamAssetMapper.selectEamAssetByAssetId(assetId);
    }

    /**
     * 查询资产列表
     * 
     * @param eamAsset 资产
     * @return 资产
     */
    @Override
    public List<EamAsset> selectEamAssetList(EamAsset eamAsset)
    {
        return eamAssetMapper.selectEamAssetList(eamAsset);
    }

    /**
     * 新增资产
     * 
     * @param eamAsset 资产
     * @return 结果
     */
    @Override
    public int insertEamAsset(EamAsset eamAsset)
    {
        return eamAssetMapper.insertEamAsset(eamAsset);
    }

    /**
     * 修改资产
     * 
     * @param eamAsset 资产
     * @return 结果
     */
    @Override
    public int updateEamAsset(EamAsset eamAsset)
    {
        return eamAssetMapper.updateEamAsset(eamAsset);
    }

    /**
     * 批量删除资产
     * 
     * @param assetIds 需要删除的资产主键
     * @return 结果
     */
    @Override
    public int deleteEamAssetByAssetIds(Long[] assetIds)
    {
        return eamAssetMapper.deleteEamAssetByAssetIds(assetIds);
    }

    /**
     * 删除资产信息
     * 
     * @param assetId 资产主键
     * @return 结果
     */
    @Override
    public int deleteEamAssetByAssetId(Long assetId)
    {
        return eamAssetMapper.deleteEamAssetByAssetId(assetId);
    }
}
